/**
 * @FileName FlyWeight.java
 * @Package com.designMode.flyweight
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-19 下午3:27:00
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.flyweight;

/**
 * @author 顾博君
 * @ClassName FlyWeight
 * @Date 2016-1-19 下午3:27:00
 * @Function 抽象享元角色
 */
public abstract class FlyWeight {
    private String intrinsic;
    protected final String extrinsic;

    public FlyWeight(String _extrinsic) {
        this.extrinsic = _extrinsic;
    }

    /**
     * 定义业务操作
     */
    public abstract void operate();

    // 内部状态的getter和setter
    public String getIntrinsic() {
        return intrinsic;
    }

    public void setIntrinsic(String intrinsic) {
        this.intrinsic = intrinsic;
    }
}
